<?php
include 'lib/class.photomanager.php';

$destination = 'destination.png';
$source = 'medias/widget_video.png'; //png transparent
$source = 'medias/flickr/4029096906_98e1d7b75c_b.jpg';
// $source = 'medias/manuel_ismanager_2.0.pdf';

// IsmImageMagick
$resource = new photomanager($source);
// $destination = $resource->getDestination();
// $resource->setTransparency(true);
// $resource->setActivePage(1);
$resource->resizeAndCrop(415, 233, 415, 233, 0, 0, '#333', '>', 'center');
// $resource->thumbnail(150, 150, '#333');
// $image = $resource->load();
// $resource->deleteDestinationFile();
$resource->display();

?>
<html><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	<head>
		<meta http-equiv="Content-type" content="text/html; charset=utf-8">
		<title>image</title>
		<style type="text/css" media="screen">
		    
		    body {
		        background-color: #ddd;
		    }
		</style>
	</head>
		<body id="image">
		<img src="<?php echo $destination ?>">
		<?php print('<pre>');print_r($resource->getLog());print('</pre>'); ?>
		</body>
</html>